package cn.lcsjsxy.yxz.methodoverride;

public class Student  extends Person{

    String major;

    public Student(){

    }
    public Student(String major){
        this.major = major;
    }

    public void study(){
        System.out.println("我学习的专业是: " + major);
    }

    //重写
    public void  eat(){
        System.out.println("要多吃有营养的食物");
    }
    public void show(){
        System.out.println("我是个学生");
    }
    public String info(){
        return null;
    }
}
